from .abstract import *
from ..pizza.abstract import Pizza
from ..pizza.pizza import *
from ..factory.ingredient_factory import *

__all__ = ["NYPizzaStore", "ChicagoPizzaStore"]

class NYPizzaStore(PizzaStore):
    def create_pizza(self, pizza_type: PizzaStore.PizzaType) -> Pizza:
        pizza = None
        match pizza_type:
            case self.PizzaType.CHEESE:
                pizza = CheesePizza(NYPizzaIngredientFactory())
                pizza.name = "New York Style Cheese Pizza"
            case self.PizzaType.VEGGIE:
                pizza = VeggiePizza(NYPizzaIngredientFactory())
                pizza.name = "New York Style Veggie Pizza"
            case self.PizzaType.CLAM:
                pizza = ClamPizza(NYPizzaIngredientFactory())
                pizza.name = "New York Style Clam Pizza"
            case self.PizzaType.PEPPERONI:
                pizza = PepperoniPizza(NYPizzaIngredientFactory())
                pizza.name = "New York Style Pepperoni Pizza"
        return pizza


class ChicagoPizzaStore(PizzaStore):
    def create_pizza(self, pizza_type: PizzaStore.PizzaType) -> Pizza:
        pizza = None
        match pizza_type:
            case self.PizzaType.CHEESE:
                pizza = CheesePizza(ChicagoPizzaIngredientFactory())
                pizza.name = "Chicago Style Cheese Pizza"
            case self.PizzaType.VEGGIE:
                pizza = VeggiePizza(ChicagoPizzaIngredientFactory())
                pizza.name = "Chicago Style Veggie Pizza"
            case self.PizzaType.CLAM:
                pizza = ClamPizza(ChicagoPizzaIngredientFactory())
                pizza.name = "Chicago Style Clam Pizza"
            case self.PizzaType.PEPPERONI:
                pizza = PepperoniPizza(ChicagoPizzaIngredientFactory())
                pizza.name = "Chicago Style Pepperoni Pizza"
        return pizza